package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.ISearchActivityModel;
import com.wgts.wgts.mvp.model.imp.SearchActivityModel;
import com.wgts.wgts.mvp.presenter.IMainActivityPersenter;
import com.wgts.wgts.mvp.presenter.ISearchActivityPersenter;
import com.wgts.wgts.mvp.presenter.imp.SearchActivityPersenter;
import com.wgts.wgts.mvp.view.ISearchActivityView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.SharedpreferencesHelper;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/9/2710:14
 *
 */
@Module
public class SearchActivityModule {
    private ISearchActivityView view;

    public SearchActivityModule(ISearchActivityView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public ISearchActivityView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public ISearchActivityModel provideModel(NetService netService, SharedpreferencesHelper sharedpreferencesHelper){
        return new SearchActivityModel(netService, sharedpreferencesHelper);
    }

    @Provides
    @ActivityScope
    public ISearchActivityPersenter providePresenter(ISearchActivityModel model, ISearchActivityView view){
        return new SearchActivityPersenter(model, view);
    }
}
